package com.jic.member.constant.enums;

/**
 * @author yinhaijun
 * @date: 2020/6/6
 */
public enum NodeTypeEnum {

    USER_DELINEATE(1, "用户圈定"),
    EVENT_TRIGGER(2, "事件触发"),
    EVENT_TRIGGER_WAIT(3, "事件触发等待"),
    EXECUTE_ACTION(4, "执行动作"),
    END(5, "结束");

    private NodeTemplateTypeEnum nodeTemplateType;

    private Integer code;

    private String message;

    NodeTypeEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public NodeTypeEnum getByCode(Integer code){
        NodeTypeEnum[] values = NodeTypeEnum.values();
        for(NodeTypeEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
